<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        
        var name = "window"
        var obj = {
            name:"obj",
            sayName:function(){
                console.log(this.name);
            }
        }
        function go(){
            console.log(this.name);
        }
        go()
        // call 、apply 也可以改变函数内部this关键字的指向
        go.call(obj)
        go.apply(obj)
    </script>
</body>
</html>